package com.huluobo.lc.kotlinim1812a.contract.chat

import com.huluobo.lc.kotlinim1812a.contract.BasePresenter
import com.hyphenate.chat.EMMessage

/**
 * @author Lc
 * @description:
 * @date :2021/6/29 10:15
 */
interface ChatContract {
    interface Presenter : BasePresenter {

        /**
         * @param contact 消息联系人
         * @param message 具体消息
         */
        fun sendMessage(contact: String, message: String)
        fun addMessage(username: String, messages: MutableList<EMMessage>?)

        //新增需求
        fun loadMessage(username: String)
        fun loadMoreMessage(username: String)
    }

    interface View {
        fun onStartSendMessage()
        fun onSendMessageSuccess()
        fun onSendMessageFailed()
        fun onMessageLoaded()
        fun onMoreMessageLoaded(size: Int)
    }
}